"""
根据传入的名称以及config构建query analyse 处理类
"""
from client_resource.es_client import EsClient


class ResourceFactory:
    @classmethod
    def create_service(cls, config):
        service = None
        if config["name"] == "es_client":
            service = EsClient(config)

        if not service:
            print("init client_resource service %s failed " % config["name"])
        return service

